package org.bet.domain;

import java.io.Serializable;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.util.Assert;

@Document
public class Syndicator extends AbstractIDAssignedObject {
	private static final long serialVersionUID = 7812341509052452072L;
	
	private Institution institution;
	private Engineer engineer;
	private Service service;

	public Syndicator(String id) {
		super(id);
	}

	public Institution getInstitution() {
		return institution;
	}

	public void setInstitution(Institution institution) {
		this.institution = institution;
	}

	public Engineer getEngineer() {
		return engineer;
	}

	public void setEngineer(Engineer engineer) {
		this.engineer = engineer;
	}

	public Service getService() {
		return service;
	}

	public void setService(Service service) {
		this.service = service;
	}
	
	public static class Institution implements Serializable {
		
		private static final long serialVersionUID = -7441451079416951202L;

		private String name;
		private String url;
		private String logo;
		
		public Institution() {}
		
		public Institution(String name, String url, String logo) {
			this.name = name;
			this.url = url;
			this.logo = logo;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getUrl() {
			return url;
		}

		public void setUrl(String url) {
			this.url = url;
		}

		public String getLogo() {
			return logo;
		}

		public void setLogo(String logo) {
			this.logo = logo;
		}
	}
	
	public static class Engineer implements Serializable {
		private static final long serialVersionUID = 8369539805598384438L;

		private String name;
		private String email;
		
		public Engineer() {}
		
		public Engineer(String name, String email) {
			this.name = name;
			this.email = email;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getEmail() {
			return email;
		}

		public void setEmail(String email) {
			this.email = email;
		}
	}

	public static class Service implements Serializable {
		private static final long serialVersionUID = 3289298138619053954L;

		private String title;
		private String version;
		private String description;
		
		public Service() {}
		
		public Service(String title, String version, String description) {
			this.title = title;
			this.version = version;
			this.description = description;
		}

		public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}

		public String getVersion() {
			return version;
		}

		public void setVersion(String version) {
			this.version = version;
		}

		public String getDescription() {
			return description;
		}

		public void setDescription(String description) {
			this.description = description;
		}
				
	}

	public String toString(){
		return ToStringBuilder.reflectionToString(this);
	}

}
